<template>
  <div id="app">


    
      <hearder></hearder>



    <router-view />


    
      <Footer></Footer>
    


    <el-backtop :bottom="30">
      <div style="{
    height: 100%;
    width: 100%;
    background-color: #f2f5f6;
    box-shadow: 0 0 6px rgba(0,0,0, .12);
    text-align: center;
    line-height: 40px;
    color: #1989fa;
    }">top</div>

    </el-backtop>
  </div>
</template>

<script>
import hearder from './components/hearder.vue'
import Footer from './components/Footer.vue'
export default {
  name: 'App',
  data() {
    return {
      path: "",
    }
  },
  components: {
    Footer,
    hearder
  },
  mounted() {
    this.path = this.$route.path; /*this.path 为当前页面的路由 */

  },
  methods: {
  },
  /*监测路由的变化 */
  watch: {
    $route(to, from) {
      this.path = to.path;
    }

  },

}
</script>

<style>
.hearder {
  border: 1px red solid;

}
body{
    background-color: aliceblue;
}
</style>
